exports.getPostData = function(ctx) {
  return new Promise((resolve, reject)=>{
    try {
      let postdata = ''
      ctx.req.on('data', (data) => {
        postdata += data
      })
      ctx.req.on('end', ()=>{
        resolve(postdata)
      })
    } catch (error) {
      reject(error)
    }
  })
}